﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="module_help.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.module.module_help" %>

<%@ Register Src="../usercontrol/titlepage.ascx" TagName="titlepage" TagPrefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
  
       <script src="../../Common/common.js" language="javascript" type="text/javascript"></script>  
    
    
   
   <script src="../../common/calendar1.js" language="javascript" type="text/javascript"></script>
 </head>
<body>
    <form id="form1" runat="server">
    <uc2:titlepage id="Titlepage1" runat="server" inittitle="预定记录"></uc2:titlepage>
        <input type="hidden" id="hidmid" value="" runat="server"/>
   <div id="loadinfo" runat="server"></div> 
   <br />
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
   <tr><td>内容：</td><td><textarea id="txtcomment" rows="5" cols="50"></textarea></td></tr>
   <tr><td>排序：</td><td><input type="text" value="0" id="txtrank" size="5" maxlength="2"/>(从小到大排列)</td></tr>
   <tr><td><input type="button" onclick="javascript:save();" id="btnsave" value="保存" /><input type="hidden" value="" id="hidid" /></td><td></td></tr>
   </table>
   <script type="text/javascript">
   var l = $F("loadinfo");
    function loadhelp()
    {
        var mid=parseInt($F("hidmid").value);
        EZCRS.HCMS.myajax.AjaxBaseInfo.getmodulehelp(mid,function(resp){l.innerHTML=resp.value;});  //最后的赋值
    }
    
    loadhelp();
    
    function del(obj)
    {
     if(confirm('确认要删除信息吗？'))
     {
      var cid=parseInt(obj.parentNode.parentNode.cells[0].innerText);
      EZCRS.HCMS.myajax.AjaxBaseInfo.delmodulehelp(cid,function(resp){if(resp.value=="1"){loadhelp();}else{alert('删除失败，请稍候再试！');}});
    }
    }
    
    function modify(obj)
    {
      var pobj=obj.parentNode.parentNode;
      $F("txtcomment").value=pobj.cells[1].innerText;
      $F("txtrank").value=pobj.cells[2].innerText;
      $F("hidid").value=pobj.cells[0].innerText;
      $F("btnsave").value="修改";
    }
    
    function save()
    {
    var id=0;
      if($F("hidid").value!="")
      {
       id=parseInt($F("hidid").value);
      }
      var rank=parseInt($F("txtrank").value);
      var comment=$F("txtcomment").value;
      
      EZCRS.HCMS.myajax.AjaxBaseInfo.savemodulehelp(id,parseInt($F("hidmid").value),rank, comment,function(resp){if(resp.value=="1"){alert('保存成功！');$F("txtcomment").value='';$F("txtrank").value='';$F("hidid").value='';$F("btnsave").value="添加";loadhelp();}else{alert('修改失败，请稍候再试！');}})
      
    }
    
   </script> 
    </form>
   </body>
</html>
